package com.syg.Listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;

/**
 * ServletContext对象属性的添加,修改,删除
 */
public class _06_ServletContext_Listener implements ServletContextAttributeListener {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public void attributeAdded(ServletContextAttributeEvent servletContextAttributeEvent) {
        logger.info("attributeAdded()==>servletContext添加属性了");
    }

    @Override
    public void attributeRemoved(ServletContextAttributeEvent servletContextAttributeEvent) {
        logger.info("attributeRemoved()==>servletContext删除属性了");
    }

    @Override
    public void attributeReplaced(ServletContextAttributeEvent servletContextAttributeEvent) {
        logger.info("attributeReplaced()==>ServletContext修改属性了");
    }
}
